The FSSpecToNativePathName function extracts the native pathname from an FSSpec .
OSErr FSSpecToNativePathName(FSSpec *inFile, char *outName,
unsigned long outLen, long flags);
As an example, consider the following Windows full path:
D:\Media\My Movies\Really Cool Movies\Tasty Fish.mov
If you have an FSSpec for this path, you can extract either the whole path or portions of the path using one of the above flags. For the above path and each flag, the resulting strings are:
D:\Media\My Movies\Really Cool Movies\Tasty Fish.mov
Tasty Fish.mov
Using kDirectoryPathOnly gives
D:\Media\My Movies\Really Cool Movies
Sometimes, developers may need to convert a FSSpec returned by QuickTime APIs to a native pathname to be passed onto the current operating system. The FSSpecToNativePathName function accepts a FSSpec and fills in the buffer pathname whose size is pathnameMaxBufferSize with the equivalent pathname string. This size must also include the size necessary to hold the string terminator.
| Previous | Chapter Contents | Chapter Top | Next |